# -*- coding:UTF-8 -*-
from selenium import webdriver
import os,configparser
projectpath = os.path.dirname(os.getcwd())
config_file = projectpath + '/data/' + 'testconfig.ini'
config = configparser.ConfigParser()
config.read(config_file, encoding='UTF-8')
test_browser = config.get('Default', 'test_browser')

# @pytest.fixture(scope='session', autouse=True)
def browser():
    if test_browser == "Chrome":
        driver = webdriver.Chrome()
    if test_browser == "IE":
        driver = webdriver.Ie()
    if test_browser == "Firefox":
        driver = webdriver.Firefox()
    return driver

